from file_method import Location_Sample
from class_define import case_rename
import re,os
if __name__=='__main__':
    file_path = str(input("file_path:"))
    # app_path=str(input("App_path:"))
    app_path = "Src_Code\\APP_work\\ccm_auto_test\\app_x86"
    tmp = case_rename.case_name()
    tmp.absolute_file_path = Location_Sample.win_to_ubuntu_filepath(file_path, "Sample")
    tmp.absolute_app_path = Location_Sample.win_to_ubuntu_filepath(app_path, "Sample")
    # find all sample which need change
    # 需要匹配的模式
    tmp.change_pattern = re.compile(r'(.*?_.*?_.*?_Err[0-9]{1,4}_LastErr.*?_Den.*?)_(Dir[0-4])_(Ver.*?_SN.*?)')
    tmp.find_sample_file()